#include "Game2DManager.h"
GameManager::GameManager()
{
	_bf = new GraphicsBuffer();
	_dxInput = new Input();
	_sound = new Sound();
}
GameManager ::~GameManager()
{
}
bool GameManager::Init(HINSTANCE hInst,HWND hwnd)
{
	if(!_bf->Inint_Direct3D(hwnd,WINDOW_WIDTH,WINDOW_HEIGHT))
	{
		MessageBox(hwnd,"Loi khoi tao Direct","Error", MB_OK);
		return false;
	}

	if(! _dxInput->Init_DirectInput(hInst,hwnd))
	{
		MessageBox(hwnd,"Loi khoi tao Input","Error", MB_OK);
		return false;
	}

	if(!_dxInput->Init_Keyboard(hwnd))
	{
		MessageBox(hwnd, "Loi khoi tao ban phim", "Error", MB_OK);
		return false;
	}
	if(!_sound->Init(hwnd))
	{
		MessageBox(hwnd, "Loi khoi tao am thanh", "Error", MB_OK);
		return false;
	}

}
void GameManager::Run(HWND hwnd,DWORD tickPerFrame)
{

}